// miniprogram/pages/poetry/detail/detail.js

Page({
  data: {
    poetry: {
      author: "李白",
      content: ["君不见黄河之水天上来，奔流到海不复回。",
        "君不见高堂明镜悲白发，朝如青丝暮成雪。",
        "人生得意须尽欢，莫使金樽空对月。",
        "天生我材必有用，千金散尽还复来。",
        "烹羊宰牛且为乐，会须一饮三百杯。",
        "岑夫子，丹丘生，将进酒，杯莫停。",
        "与君歌一曲，请君为我侧耳听。"
      ],
      index: "1",
      pic: "http://pics.shicimingju.com/item/25739.jpg",
      time: "[唐]",
      title: "《将进酒·君不见黄河之水天上来》"
    }
  },
  onLoad: function (options) {
    console.log(options)
    var poetryStr = decodeURIComponent(options.poetry)
    var poetryObj = JSON.parse(poetryStr)
    console.log(poetryObj)
    this.setData({
      poetry: poetryObj
    })
  },
  onShareAppMessage: function () {

  }
})